<!DOCTYPE html>
<html lang="">

<head>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width, initial-scale=1.0">
	<meta http-equiv="X-UA-Compatible" content="ie=edge">
<meta itemprop="name" content="linux系统安装并使用杀毒软件">
<meta itemprop="description" content="linux系统安装并使用杀毒软件 扫描工具：Clamav  ClamAV 杀毒是Linux平台最受欢迎的杀毒软件。 支持多种平台，如：Linux/Unix、MAC OS X、Windows、OpenVMS。 ClamAV 是基于病毒扫描的命令行工具，但同时也有支持图形界面的ClamTK 工具。  Step1: 安装
# 安装之前更新一下系统软件包centos: sudo yum updateubuntu: sudo apt update &amp;&amp; sudo apt upgrade# 安装centos: sudo yum -y install clamav clamav-daemonubuntu: sudo apt install clamav clamav-daemon# 版本查看clamscan --versionStpe2: 更新病毒库
# 先停止clamavsudo systemctl stop clamav-freshclam# 更新病毒库sudo freshclam# 重启clamav并设置开机自启动sudo systemctl enable clamav-freshclam --nowStep3: 执行扫描
sudo clamscan -r /# 该命令仅能扫描出被感染的文件或程序，如果要扫描后自动删除，携带参数--remove# 扫描并移除感染文件(慎用)sudo clamscan -r / --remove# 将扫描结果输出到文件clamscan -r / -l /path/to/logfile# 扫描完成后，clamav会输出报告----------- SCAN SUMMARY -----------Known viruses: 8696712 //病毒库总数Engine version: 0.">
<meta itemprop="datePublished" content="2024-08-06T17:26:10&#43;08:00" />
<meta itemprop="dateModified" content="2024-08-06T17:26:10&#43;08:00" />
<meta itemprop="wordCount" content="157">



<meta itemprop="keywords" content="" /><meta property="og:title" content="linux系统安装并使用杀毒软件" />
<meta property="og:description" content="linux系统安装并使用杀毒软件 扫描工具：Clamav  ClamAV 杀毒是Linux平台最受欢迎的杀毒软件。 支持多种平台，如：Linux/Unix、MAC OS X、Windows、OpenVMS。 ClamAV 是基于病毒扫描的命令行工具，但同时也有支持图形界面的ClamTK 工具。  Step1: 安装
# 安装之前更新一下系统软件包centos: sudo yum updateubuntu: sudo apt update &amp;&amp; sudo apt upgrade# 安装centos: sudo yum -y install clamav clamav-daemonubuntu: sudo apt install clamav clamav-daemon# 版本查看clamscan --versionStpe2: 更新病毒库
# 先停止clamavsudo systemctl stop clamav-freshclam# 更新病毒库sudo freshclam# 重启clamav并设置开机自启动sudo systemctl enable clamav-freshclam --nowStep3: 执行扫描
sudo clamscan -r /# 该命令仅能扫描出被感染的文件或程序，如果要扫描后自动删除，携带参数--remove# 扫描并移除感染文件(慎用)sudo clamscan -r / --remove# 将扫描结果输出到文件clamscan -r / -l /path/to/logfile# 扫描完成后，clamav会输出报告----------- SCAN SUMMARY -----------Known viruses: 8696712 //病毒库总数Engine version: 0." />
<meta property="og:type" content="article" />
<meta property="og:url" content="https://www.lican.site/postsbak/%E5%AE%89%E8%A3%85%E5%B9%B6%E4%BD%BF%E7%94%A8clamav/" />
<meta property="article:published_time" content="2024-08-06T17:26:10+08:00" />
<meta property="article:modified_time" content="2024-08-06T17:26:10+08:00" />
<meta name="twitter:card" content="summary"/>
<meta name="twitter:title" content="linux系统安装并使用杀毒软件"/>
<meta name="twitter:description" content="linux系统安装并使用杀毒软件 扫描工具：Clamav  ClamAV 杀毒是Linux平台最受欢迎的杀毒软件。 支持多种平台，如：Linux/Unix、MAC OS X、Windows、OpenVMS。 ClamAV 是基于病毒扫描的命令行工具，但同时也有支持图形界面的ClamTK 工具。  Step1: 安装
# 安装之前更新一下系统软件包centos: sudo yum updateubuntu: sudo apt update &amp;&amp; sudo apt upgrade# 安装centos: sudo yum -y install clamav clamav-daemonubuntu: sudo apt install clamav clamav-daemon# 版本查看clamscan --versionStpe2: 更新病毒库
# 先停止clamavsudo systemctl stop clamav-freshclam# 更新病毒库sudo freshclam# 重启clamav并设置开机自启动sudo systemctl enable clamav-freshclam --nowStep3: 执行扫描
sudo clamscan -r /# 该命令仅能扫描出被感染的文件或程序，如果要扫描后自动删除，携带参数--remove# 扫描并移除感染文件(慎用)sudo clamscan -r / --remove# 将扫描结果输出到文件clamscan -r / -l /path/to/logfile# 扫描完成后，clamav会输出报告----------- SCAN SUMMARY -----------Known viruses: 8696712 //病毒库总数Engine version: 0."/>

	<link rel="apple-touch-icon" sizes="180x180" href="/apple-touch-icon.png">
	<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
	<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
	<link rel="manifest" href="/site.webmanifest">
	<link rel="mask-icon" href="/safari-pinned-tab.svg" color="">
	<link rel="shortcut icon" href="/favicon.ico">

	<title>linux系统安装并使用杀毒软件</title>
	<link rel="stylesheet" href="https://www.lican.site/css/style.min.d3141168199607bf3a517216ce3c263814eecdbc8fca72a9a88700799a838219.css">
	
</head>

<body id="page">
	
	<header id="site-header" class="animated slideInUp faster">
		<div class="hdr-wrapper section-inner">
			<div class="hdr-left">
				<div class="site-branding">
					<a href="https://www.lican.site">花落雨忧</a>
				</div>
				<nav class="site-nav hide-in-mobile">
					<a href="https://www.lican.site/posts">首页</a>
					<a href="https://www.lican.site/tech/">技术文档</a>
					<a href="https://www.lican.site/article/">文章</a>
					<a href="https://www.lican.site/project/">项目</a>
					<a href="https://www.lican.site/about/">关于</a>
				</nav>
			</div>
			<div class="hdr-right hdr-icons">
				<button id="menu-btn" class="hdr-btn" title="Menu"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-menu"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg></button>
			</div>
		</div>
	</header>
	<div id="mobile-menu" class="animated fast">
		<ul>
			<li><a href="https://www.lican.site/posts">首页</a></li>
			<li><a href="https://www.lican.site/tech/">技术文档</a></li>
			<li><a href="https://www.lican.site/article/">文章</a></li>
			<li><a href="https://www.lican.site/project/">项目</a></li>
			<li><a href="https://www.lican.site/about/">关于</a></li>
		</ul>
	</div>


	<main class="site-main section-inner thin animated fadeIn faster">
		<h1>linux系统安装并使用杀毒软件</h1>
		<div class="content">
			<h3 id="linux系统安装并使用杀毒软件">linux系统安装并使用杀毒软件<a href="#linux系统安装并使用杀毒软件" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg></a></h3>
<h4 id="扫描工具clamav">扫描工具：Clamav<a href="#扫描工具clamav" class="anchor" aria-hidden="true"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M15 7h3a5 5 0 0 1 5 5 5 5 0 0 1-5 5h-3m-6 0H6a5 5 0 0 1-5-5 5 5 0 0 1 5-5h3"></path><line x1="8" y1="12" x2="16" y2="12"></line></svg></a></h4>
<ul>
<li>ClamAV 杀毒是Linux平台最受欢迎的杀毒软件。</li>
<li>支持多种平台，如：Linux/Unix、MAC OS X、Windows、OpenVMS。</li>
<li>ClamAV 是基于病毒扫描的命令行工具，但同时也有支持图形界面的ClamTK 工具。</li>
</ul>
<p>Step1: 安装</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#960050;background-color:#1e0010">#</span> <span style="color:#a6e22e">安装之前更新一下系统软件包</span>
<span style="color:#a6e22e">centos</span>: <span style="color:#a6e22e">sudo</span> <span style="color:#a6e22e">yum</span> <span style="color:#a6e22e">update</span>
<span style="color:#a6e22e">ubuntu</span>: <span style="color:#a6e22e">sudo</span> <span style="color:#a6e22e">apt</span> <span style="color:#a6e22e">update</span> <span style="color:#f92672">&amp;&amp;</span> <span style="color:#a6e22e">sudo</span> <span style="color:#a6e22e">apt</span> <span style="color:#a6e22e">upgrade</span>
<span style="color:#960050;background-color:#1e0010">#</span> <span style="color:#a6e22e">安装</span>
<span style="color:#a6e22e">centos</span>: <span style="color:#a6e22e">sudo</span> <span style="color:#a6e22e">yum</span> <span style="color:#f92672">-</span><span style="color:#a6e22e">y</span> <span style="color:#a6e22e">install</span> <span style="color:#a6e22e">clamav</span> <span style="color:#a6e22e">clamav</span><span style="color:#f92672">-</span><span style="color:#a6e22e">daemon</span>
<span style="color:#a6e22e">ubuntu</span>: <span style="color:#a6e22e">sudo</span> <span style="color:#a6e22e">apt</span> <span style="color:#a6e22e">install</span> <span style="color:#a6e22e">clamav</span> <span style="color:#a6e22e">clamav</span><span style="color:#f92672">-</span><span style="color:#a6e22e">daemon</span>
<span style="color:#960050;background-color:#1e0010">#</span> <span style="color:#a6e22e">版本查看</span>
<span style="color:#a6e22e">clamscan</span> <span style="color:#f92672">--</span><span style="color:#a6e22e">version</span>
</code></pre></div><p>Stpe2: 更新病毒库</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#960050;background-color:#1e0010">#</span> <span style="color:#a6e22e">先停止clamav</span>
<span style="color:#a6e22e">sudo</span> <span style="color:#a6e22e">systemctl</span> <span style="color:#a6e22e">stop</span> <span style="color:#a6e22e">clamav</span><span style="color:#f92672">-</span><span style="color:#a6e22e">freshclam</span>
<span style="color:#960050;background-color:#1e0010">#</span> <span style="color:#a6e22e">更新病毒库</span>
<span style="color:#a6e22e">sudo</span> <span style="color:#a6e22e">freshclam</span>
<span style="color:#960050;background-color:#1e0010">#</span> <span style="color:#a6e22e">重启clamav并设置开机自启动</span>
<span style="color:#a6e22e">sudo</span> <span style="color:#a6e22e">systemctl</span> <span style="color:#a6e22e">enable</span> <span style="color:#a6e22e">clamav</span><span style="color:#f92672">-</span><span style="color:#a6e22e">freshclam</span> <span style="color:#f92672">--</span><span style="color:#a6e22e">now</span>
</code></pre></div><p>Step3: 执行扫描</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#a6e22e">sudo</span> <span style="color:#a6e22e">clamscan</span> <span style="color:#f92672">-</span><span style="color:#a6e22e">r</span> <span style="color:#f92672">/</span>
<span style="color:#960050;background-color:#1e0010">#</span> <span style="color:#a6e22e">该命令仅能扫描出被感染的文件或程序</span><span style="color:#960050;background-color:#1e0010">，</span><span style="color:#a6e22e">如果要扫描后自动删除</span><span style="color:#960050;background-color:#1e0010">，</span><span style="color:#a6e22e">携带参数</span>
<span style="color:#f92672">--</span><span style="color:#a6e22e">remove</span>
<span style="color:#960050;background-color:#1e0010">#</span> <span style="color:#a6e22e">扫描并移除感染文件</span>(<span style="color:#a6e22e">慎用</span>)
<span style="color:#a6e22e">sudo</span> <span style="color:#a6e22e">clamscan</span> <span style="color:#f92672">-</span><span style="color:#a6e22e">r</span> <span style="color:#f92672">/</span> <span style="color:#f92672">--</span><span style="color:#a6e22e">remove</span>
<span style="color:#960050;background-color:#1e0010">#</span> <span style="color:#a6e22e">将扫描结果输出到文件</span>
<span style="color:#a6e22e">clamscan</span> <span style="color:#f92672">-</span><span style="color:#a6e22e">r</span> <span style="color:#f92672">/</span> <span style="color:#f92672">-</span><span style="color:#a6e22e">l</span> <span style="color:#f92672">/</span><span style="color:#a6e22e">path</span><span style="color:#f92672">/</span><span style="color:#a6e22e">to</span><span style="color:#f92672">/</span><span style="color:#a6e22e">logfile</span>

<span style="color:#960050;background-color:#1e0010">#</span> <span style="color:#a6e22e">扫描完成后</span><span style="color:#960050;background-color:#1e0010">，</span><span style="color:#a6e22e">clamav会输出报告</span>
<span style="color:#f92672">-----------</span> <span style="color:#a6e22e">SCAN</span> <span style="color:#a6e22e">SUMMARY</span> <span style="color:#f92672">-----------</span>
<span style="color:#a6e22e">Known</span> <span style="color:#a6e22e">viruses</span>: <span style="color:#ae81ff">8696712</span>        				<span style="color:#75715e">//病毒库总数
</span><span style="color:#75715e"></span><span style="color:#a6e22e">Engine</span> <span style="color:#a6e22e">version</span>: <span style="color:#ae81ff">0.103.11</span>       				<span style="color:#75715e">//版本
</span><span style="color:#75715e"></span><span style="color:#a6e22e">Scanned</span> <span style="color:#a6e22e">directories</span>: <span style="color:#ae81ff">60379</span>   				<span style="color:#75715e">//扫描文件夹数
</span><span style="color:#75715e"></span><span style="color:#a6e22e">Scanned</span> <span style="color:#a6e22e">files</span>: <span style="color:#ae81ff">299909</span>           			<span style="color:#75715e">//扫描的文件总数
</span><span style="color:#75715e"></span><span style="color:#a6e22e">Infected</span> <span style="color:#a6e22e">files</span>: <span style="color:#ae81ff">0</span> 	   	      			    <span style="color:#75715e">//感染文件数
</span><span style="color:#75715e"></span><span style="color:#a6e22e">Total</span> <span style="color:#a6e22e">errors</span>: <span style="color:#ae81ff">26865</span>  					   <span style="color:#75715e">//这些错误可能由多种原因引起，如文件权限、文件系统损坏、磁盘错误或扫描过程中的其他中断
</span><span style="color:#75715e"></span><span style="color:#a6e22e">Data</span> <span style="color:#a6e22e">scanned</span>: <span style="color:#ae81ff">18863.32</span> <span style="color:#a6e22e">MB</span> 					<span style="color:#75715e">//实际扫描数据大小
</span><span style="color:#75715e"></span><span style="color:#a6e22e">Data</span> <span style="color:#a6e22e">read</span>: <span style="color:#ae81ff">36136.95</span> <span style="color:#a6e22e">MB</span> (<span style="color:#a6e22e">ratio</span> <span style="color:#ae81ff">0.52</span>:<span style="color:#ae81ff">1</span>) 		 <span style="color:#75715e">//扫描读取数据大小
</span><span style="color:#75715e"></span><span style="color:#a6e22e">Time</span>: <span style="color:#ae81ff">3982.683</span> <span style="color:#a6e22e">sec</span> (<span style="color:#ae81ff">66</span> <span style="color:#a6e22e">m</span> <span style="color:#ae81ff">22</span> <span style="color:#a6e22e">s</span>) 				<span style="color:#75715e">//耗时
</span><span style="color:#75715e"></span><span style="color:#a6e22e">Start</span> <span style="color:#a6e22e">Date</span>: <span style="color:#ae81ff">2024</span>:<span style="color:#ae81ff">08</span>:<span style="color:#ae81ff">06</span> <span style="color:#ae81ff">15</span>:<span style="color:#ae81ff">50</span>:<span style="color:#ae81ff">46</span>
<span style="color:#a6e22e">End</span> <span style="color:#a6e22e">Date</span>:   <span style="color:#ae81ff">2024</span>:<span style="color:#ae81ff">08</span>:<span style="color:#ae81ff">06</span> <span style="color:#ae81ff">16</span>:<span style="color:#ae81ff">57</span>:<span style="color:#ae81ff">09</span>
</code></pre></div><p>如果在centos下安装失败：启用EPEL仓库</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#a6e22e">sudo</span> <span style="color:#a6e22e">yum</span> <span style="color:#a6e22e">install</span> <span style="color:#a6e22e">epel</span><span style="color:#f92672">-</span><span style="color:#a6e22e">release</span>
</code></pre></div><p>然后</p>
<div class="highlight"><pre style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4"><code class="language-go" data-lang="go"><span style="color:#a6e22e">sudo</span> <span style="color:#a6e22e">yum</span> <span style="color:#a6e22e">install</span> <span style="color:#a6e22e">clamav</span> <span style="color:#a6e22e">clamav</span><span style="color:#f92672">-</span><span style="color:#a6e22e">server</span> <span style="color:#a6e22e">clamav</span><span style="color:#f92672">-</span><span style="color:#a6e22e">update</span>
</code></pre></div>
		</div>
	</main>

	<footer id="site-footer" class="section-inner thin animated fadeIn faster">
		<p>&copy; 2024 <a href="https://www.lican.site"></a></p>
		<p>
			Made with <a href="https://gohugo.io/" target="_blank" rel="noopener">Hugo</a> &#183; Theme <a href="https://github.com/Track3/hermit" target="_blank" rel="noopener">Hermit</a> &#183; <a href="https://www.lican.site/post/index.xml" target="_blank" title="rss"><svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg></a>
		</p>
	</footer>


	<script src="https://www.lican.site/js/main.min.784417f5847151f848c339cf0acb13a06cbb648b1483435a28ed4556c4ead69b.js"></script>

</body>

</html>
